<template>
  <div class="bottle clearfix">
    <div class="left clearfix">
      <div class="details">
        <div class="title">
          {{ p1.pname }}<span>&nbsp;&nbsp;/&nbsp;&nbsp;极简系列</span>
        </div>
        <p>
          该新镇沙发系列的第一个产品乔纳斯Wagell设计了Zaozuo，但最后一个敲定并启动
        </p>
        <router-link :to="`/about/${p1.pid}`" class="buy">
          现在购买&nbsp;&nbsp;&nbsp;/&nbsp; ￥{{ p1.price }}
        </router-link>
      </div>
      <div class="pic">
        <img :src="p1.maxpic" alt="" />
      </div>
    </div>
    <div class="right clearfix">
      <div class="details">
        <div class="title">
          {{ p2.pname }}<span>&nbsp;&nbsp;/&nbsp;&nbsp;极简系列</span>
        </div>
        <p>
          该新镇沙发系列的第一个产品乔纳斯Wagell设计了Zaozuo，但最后一个敲定并启动
        </p>
        <router-link :to="`/about/${p1.pid}`" class="buy">
          现在购买&nbsp;&nbsp;&nbsp;/&nbsp; ￥{{ p2.price }}
        </router-link>
      </div>
      <div class="pic">
        <img :src="p2.maxpic" alt="" />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      p1: { price: 0 },
      p2: { price: 0 },
    };
  },
  mounted() {
    this.axios.get("/index/bottle").then((result) => {
      // console.log(result.data);
      //   console.log(this.banners);
      [this.p1, this.p2] = result.data;
      // console.log(this.p1, this.p2);
    });
  },
};
</script>
<style >
.clearfix::after {
  content: "";
  display: block;
  height: 0;
  clear: both;
}
.bottle {
  width: 1900px;
  height: 453px;
  margin-top: 100px;
  margin: 0 auto;
}
.bottle .left,
.bottle .right {
  float: left;
  width: 940px;
  min-width: 940px;
  height: 453px;
  background-color: #f5f5f5;
}
.bottle .right {
  float: right;
}
.bottle .details {
  width: 470px;
  height: 183px;
  margin-top: 135px;
  padding-left: 77px;
  box-sizing: border-box;
}
.bottle .details .title {
  font-size: 20px;
  color: #000;
  margin-bottom: 30px;
}
.bottle .details .title span {
  font-size: 14px;
  color: #d19f4f;
  padding: 2px;
}
.bottle .details p {
  font-size: 14px;
  color: rgb(102, 102, 102);
  line-height: 1.5em;
}
.bottle .details .buy {
  display: block;
  width: 127px;
  height: 16px;
  font-size: 12px;
  padding: 11px 40px;
  background-color: transparent;
  color: #1f1f1f;
  border: 2px solid #1f1f1f;
  margin-top: 30px;
}
.bottle .details .buy:hover {
  color: #d19f4f;
  border: 2px solid #d19f4f;
}
.bottle .details {
  float: left;
}
.bottle .pic {
  float: left;
}
.bottle .pic img {
  width: 469px;
  height: 452px;
}
</style>